package org.maven.ide.eclipse.wtp.ext;

import org.maven.ide.eclipse.wtp.JEEPackaging;

/**
 * ProjectConfiguratorDelegateFactory
 * 
 * @author jer@printstacktrace.org
 */
class ProjectConfiguratorDelegateFactory {

  private ProjectConfiguratorDelegateFactory() {
  }
   
  static IProjectConfiguratorDelegate getProjectConfiguratorDelegate(String packaging){
    JEEPackaging mvnPackaging = JEEPackaging.getValue(packaging);
    
    switch(mvnPackaging) {
      case WAR:
        return new WarProjectConfiguratorDelegate();
      case EAR:
        return new EarProjectConfiguratorDelegate();
      default :
        return new JavaProjectConfiguratorDelegate();
    }
  
  }
  
}
